package at.pervasive.mp3player.gui;

import java.awt.Component;
import java.io.File;

import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;

public class FileRenderer extends DefaultListCellRenderer
{

	@Override
	public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
			boolean cellHasFocus)
	{
		File file = (File) value;
		String name = file.getName();
		return super.getListCellRendererComponent(list, name, index, isSelected, cellHasFocus);
	}

}
